package com.tbryant.test.redis.usagescenarios;

import com.tbryant.test.redis.RedisConstant;
import redis.clients.jedis.Jedis;

/**
 * @auther TBryant
 * @date 2021/5/28 11:12
 */
public class PubSubTestProducer {
    private static final Jedis JEDIS = new Jedis(RedisConstant.REDIS_IP, RedisConstant.REDIS_PORT);

    public static void main(String[] args) {
        for (int i = 0; i < 20; i++) {
            JEDIS.publish(RedisConstant.REDIS_TEST_PUBSUB_CHANNEL, "hello world-" + i);
        }
    }
}
